package com.sgb.kjwl.view.ui.adapter.pick;

import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;

import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.pick.TenderDictEntity3;
import com.sgb.kjwl.view.widget.pick.PickDetailListView;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class PickNoticeDetailAdapter extends BaseRecycleAdapter<List<TenderDictEntity3>> {

    private Context mContext;
    private LinearLayout linearLayout;

    public PickNoticeDetailAdapter(Context context, List<List<TenderDictEntity3>> datas) {
        super(context, R.layout.fragment_pick_detail_list3, datas);
        mContext = context;
    }

    @Override
    public void convert(ItemViewHolder holder, List<TenderDictEntity3> tenderDictEntity3s) {
        linearLayout = holder.getItem().findViewById(R.id.root_layout);
        linearLayout.removeAllViews();
        PickDetailListView pickDetailListView = new PickDetailListView(mContext);
        pickDetailListView.setRecyclerData(tenderDictEntity3s);
        linearLayout.addView(pickDetailListView);
    }
}
